<html>
<head>
<!--
// CLC Dandelion - A Web-based Daisy Player
//by Charles L. Chen
 
//This program is free software; you can redistribute it
//and/or modify it under the terms of the GNU General Public
//License as published by the Free Software Foundation;
//either version 2.1 of the License, or (at your option) any
//later version.  This program is distributed in the hope
//that it will be useful, but WITHOUT ANY WARRANTY; without
//even the implied warranty of MERCHANTABILITY or FITNESS FOR
//A PARTICULAR PURPOSE. See the GNU General Public License for
//more details.  You should have received a copy of the GNU
//General Public License along with this program; if not, look
//on the web at on the web at http://www.gnu.org/copyleft/gpl.html
//or write to the Free Software Foundation, Inc., 59 Temple Place,
//Suite 330, Boston, MA 02111-1307, USA.
 
//Last Modified Date 05/11/2008
-->
<script src='http://google-axsjax.googlecode.com/svn/trunk/common/AxsSound.js'></script> 
 
 
<script src='http://clc-dandelion.googlecode.com/svn/trunk/code/clcd.js'></script>

<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
</head>
<body tabindex='0'>
<input id='playButton' type='button' onclick='clcdObj.stop(); clcdObj.play();' value='Play'></input>
<input type='button' onclick='clcdObj.stop();' value='Stop'></input>
<input type='button' onclick='clcdObj.stop(); clcdObj.loadNextPar();' value='Next'></input>
<input type='button' onclick='clcdObj.stop(); clcdObj.loadPrevPar();' value='Previous'></input>
<br/><br/>
<iframe id='content' width='100%' height='90%'>

</iframe>
<script>
var clcdObj = null;

function init(){
clcdObj = new clcd(document.getElementById('content'));
clcdObj.loadMaster('master.smil');

var keyHandler = function(evt){
  //If Ctrl is held, it must be for some AT. 
  if (evt.ctrlKey) return true;
  
  if (evt.keyCode == 27){ // ESC
    clcdObj.stop();
    return false;
  }
  
  if ((evt.charCode == 32) || (evt.keyCode == 32)){ // Space
    clcdObj.stop();
    clcdObj.play();
    return false;
  }
  
  if ((evt.charCode == 110) || (evt.keyCode == 110)){ // n
    clcdObj.stop();
    clcdObj.loadNextPar();
    return false;
  }
  
  if ((evt.charCode == 112) || (evt.keyCode == 112)){ // p
    clcdObj.stop();
    clcdObj.loadPrevPar();
    return false;
  }
};

if (clcdObj.browser == 'ff'){
  document.addEventListener('keypress', keyHandler, true);
} else {
  document.attachEvent('onkeypress', keyHandler);  
}

document.body.focus(); 
clcdObj.stop();
} 

init();
</script>


</body>